package com.ciei.dpagm.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ciei.dpagm.common.service.BaseService;
import com.ciei.dpagm.entity.ProjectSlaveChipConfigInterfacePinParameter;
import com.ciei.dpagm.mapper.ProjectSlaveChipConfigInterfacePinParameterMapper;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author pp
 * @date 2023/05/22
 */
@Service
public class ProjectSlaveChipConfigInterfacePinParameterService extends BaseService<ProjectSlaveChipConfigInterfacePinParameterMapper, ProjectSlaveChipConfigInterfacePinParameter> {

    /**
     * 获取列表
     * @param projectSlaveChipConfigIdList
     * @return
     */
    public List<ProjectSlaveChipConfigInterfacePinParameter> getList(List<Integer> projectSlaveChipConfigIdList){
        if(projectSlaveChipConfigIdList.isEmpty()){
            return new ArrayList<>();
        }
        LambdaQueryWrapper<ProjectSlaveChipConfigInterfacePinParameter> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.in(ProjectSlaveChipConfigInterfacePinParameter::getProjectSlaveChipConfigId,projectSlaveChipConfigIdList);
        return list(lambdaQueryWrapper);
    }

}
